<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInLeft">
    <div>
        <div class="row">
            <div class="pt10">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content clearfix pt10">
                            <div class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right">广告位置</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" th:text="${advert['advertPlace']['placeName']}"></p>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right">广告封面图片</label>
                                    <div class="col-sm-10">
                                        <div class="clearfix">
                                            <div class="file-box">
                                                <div class="file">
                                                    <div class="image">
                                                        <img alt="image" id="advert-image" class="img-responsive" th:src="${advert['imageMap']['url']}">
                                                    </div>
                                                    <div class="file-name">
                                                        <p id="file-names" th:text="${advert['imageMap']['fileName']}"></p>
                                                        <small id="create-time" th:text="'添加时间：'+${advert['imageMap']['createTime']}"></small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="hr-line-dashed"></div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right">跳转类型</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static">
                                            <span th:if="${advert['redirectType']}==1">专题页面</span>
                                            <span th:if="${advert['redirectType']}==2">课程详情</span>
                                            <span th:if="${advert['redirectType']}==3">外链地址</span>
                                        </p>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>

                                <div class="form-group page-type" th:classappend="${advert['redirectType']}!=1?'hide':''">
                                    <label class="col-sm-2 control-label text-right">专题压缩文件</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static">
                                            <a th:href="${advert['pageUrl']}" target="_blank">
                                               <span th:text="${advert['pageUrl']}"></span>
                                            </a>
                                        </p>
                                    </div>
                                </div>
                                <div class="hr-line-dashed page-type" th:classappend="${advert['redirectType']}!=1?'hide':''"></div>

                                <div class="form-group course-type" th:if="${advert['courseMap']}!=null" th:classappend="${advert['redirectType']}!=2?'hide':''">
                                    <label class="col-sm-2 control-label text-right">选择的课程</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" th:text="${advert['courseMap']['courseName']}"></p>
                                    </div>
                                </div>
                                <div class="hr-line-dashed course-type" th:if="${advert['courseMap']}!=null" th:classappend="${advert['redirectType']}!=2?'hide':''"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right">广告描述</label>
                                    <div class="col-sm-8">
                                        <p class="form-control-static" th:text="${advert['depict']}"></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
